﻿<%@ Page Language="C#"  MasterPageFile="~/MasterPage.master" AutoEventWireup="true" Inherits="Nivdal.TeamHomePage" Title="" StylesheetTheme="SkinFile" Codebehind="TeamHomePage.aspx.cs" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>

<asp:Content ID="Content2" runat="server" contentplaceholderid="HeadPlaceHolder">
    <%--<script src="JS/jquery.carouFredSel-6.2.1.js" type="text/javascript"></script>--%>
    
    <script src="JS/jquery.jcarousel.min.js" type="text/javascript"></script>

    <link href="NoamStyles/carousel.css?ver=1" rel="stylesheet" type="text/css" />

    <script type="text/javascript">

        jQuery(document).ready(function () {

            var i = $('#prizes_shelf li').length;
           
            if (i > 6) {
                jQuery('#carouselul').jcarousel({
                    scroll:6 
                });
            }
            else {
                jQuery('#carouselul').jcarousel({
                    buttonNextHTML: null,
                    buttonPrevHTML: null,
                    size: 6
                });
            }

            if (i > 0) {
                jQuery("#prizes_shelf").show();
            }
        });

</script>

    <%--<style type="text/css">
        
        a.prev, a.next 
        { 
            background: url(/Images/Icons/TeamHomePageIcons/prizes_carusel_prev.png) no-repeat transparent; 
            width: 45px; 
            height: 50px; 
            display: block; 
            position: absolute; 
            top: 85px; 
        } 
        a.prev 
        {
            left: -22px; 
            background-position: 0 0;             
        } 

        a.prev:hover {background-position: 0 -50px; } 
        a.prev.disabled { background-position: 0 -100px !important;  } 
        a.next 
        {
            right: -22px; 
            background-position: -50px 0; 
        } 
        a.next:hover { background-position: -50px -50px; } 
        a.next.disabled { background-position: -50px -100px !important;  } 
        a.prev.disabled, a.next.disabled { cursor: default; } 


   


        a.prev span, a.next span { 
            display: none; 
        } 

    </style>--%>

    <script language="javascript" type="text/javascript">
        function OpenFriendyPane() {
            $("#friendlychallanges").show();
        }

        function CloseFriendlyPanel() {
            $("#friendlychallanges").fadeOut(0);
        }

        function EditStatusOpen() {
            $("#statusDiv").hide(0);
            $("#editStatus").fadeIn(0);
            $("#ctl00_ctl00_ContentPlaceHolder3_ContentPlaceHolder1_StatusTextBox").focus();
        }

        function EditStatusCancel() {
            $("#statusDiv").fadeIn(0);
            $("#editStatus").hide(0);
        }

        function FadeInStatusBox() {
            $("#editStatus").hide(0);
        }

        function doFocus(textboxname) {
            textboxname.value = textboxname.value;
        }

        //        $(document).ready(function () {
        //            
        //            $("#scroll_prizes").carouFredSel({
        //                items: 5,
        //                circular: true,
        //                infinite: true,
        //                scroll: {
        //                    items: 1,
        //                    easing: "elastic",
        //                    duration: 0,
        //                    pauseOnHover: true
        //                },
        //                next: {
        //                    button: "#prev_img",
        //                    key: "left"
        //                },
        //                prev: {
        //                    button: "#next_img",
        //                    key: "right"
        //                }
        //            });

        //            
        //        })
        

    </script>
</asp:Content>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <asp:HiddenField ID="TeamIdHiddenField" runat="server" />
    <asp:Panel ID="MessagePanel" runat="server">
        <asp:Label ID="ErrorLabel" runat="server" Text="" SkinID="GreenSmallHeaderLabel"></asp:Label>
        <br />
    </asp:Panel>
    <div class="basic_element vectors_container">
    <div class="red_title_no_padding">
    <div class="grey_title_inside_red floater" >
        <asp:Label ID="TeamNameLabel" runat="server" Text="TeamNameLabel" CssClass="team_name_white" />
        <asp:Label ID="TeamIdLabel" runat="server" Text="TeamId" CssClass="team_id_white" /> 
    </div>
    <div class="grey_title_triangle floater"></div>
    <div class="floater padding_top2">
        <asp:Hyperlink ID="CountryFlag" runat="server" CssClass="rounded_corners" />
        <asp:ImageButton ID="BookmarkButton" runat="server" Visible="false" OnClick="BookmarkButton_Click" 
        ImageUrl="~/Images/bookmarks.png" ToolTip="<%$ Resources:Resource, TeamHomePage_BookmarkButton_ToolTip %>"/>
        <asp:ImageButton ID="ComposeMessageImageButton" ToolTip="<%$ Resources:Resource, ComposeMessageImageButton_ToolTip %>"
            ImageUrl="~/Images/Icons/mail.png"  runat="server" ></asp:ImageButton>
    </div>
    </div>
    <div class="padding5 ">
        <div class="floater padding5" >
            <span class="rounded_corners"> 
                <asp:ImageButton ID="LogoImage" runat="server" CssClass="logo_style rounded_corners"  onerror="this.src='Images/menupicture.gif';"></asp:ImageButton>
            </span>
            <br />
            <asp:Label ID="ThisTeamIsSponsoredByLabel" runat="server" Text="<%$ Resources:Resource, ThisTeamIsSponsoredByLabelText %>"  SkinID="SmallHeaderLabel"></asp:Label>
            <br />
            <asp:HyperLink ID="SponsorHyperLink" runat="server" CssClass="sponsors_logo" Target="_blank"></asp:HyperLink>
        </div>
        <div id="team_info_div" class="floater padding5">
            <asp:Label ID="ManagerLabel" runat="server" Text='<%$  Resources:Resource, Global_Manager %>' SkinID="InfoLabel"></asp:Label>
            <asp:Image ID="UserIconImage" runat="server" onerror="this.src='Images/menupicture.gif';" />
            <asp:HyperLink ID="NationalTeamLink" runat="server" CssClass="rounded_corners"></asp:HyperLink>
            <asp:Hyperlink ID="ManagerLinkButton" runat="server" Text="<%$ Resources:Resource, ManagerLinkButtonText %>" SkinID="GreenTitleHyperLink"></asp:Hyperlink>
            <asp:Label ID="NoManagerLabel" runat="server" Text="<%$ Resources:Resource, NoManagerLabelText %>" SkinID="GridLabel"></asp:Label>
            <asp:Image ID="IsOnlineImage" runat="server" ToolTip="<%$ Resources:Resource, Global_Online %>"  ImageUrl="~/Images/Icons/IsOnline.png" />
            <asp:Image ID="IsOfflineImage" runat="server" ToolTip="<%$ Resources:Resource, Global_Offline %>"  ImageUrl="~/Images/Icons/offline.png" />
            <asp:Image ID="IsPremiumUser" runat="server" ToolTip="<%$ Resources:Resource, Global_PremiumUser %>" ImageUrl="~/Images/Icons/premium.png" />
            <asp:Image ID="IsFriendImage" runat="server" ToolTip="<%$ Resources:Resource, TeamHomePage_IsFriendImageToolTip %>"
             ImageUrl="~/Images/Icons/friends.png"/>
            <asp:ImageButton ID="SuggestFriendshipImage" runat="server" ToolTip="<%$ Resources:Resource, TeamHomePage_BecomeFriendsToolTip %>"
             ImageUrl="~/Images/Icons/friends_Suggest.png" OnClick="BecomeFriendButtonClick"/>
            <asp:HyperLink ID="FriendshipSuggestionPendingImage" runat="server" ImageUrl="~/Images/Icons/friendship_pending.png"
             ToolTip="<%$ Resources:Resource, TeamHomePage_FriendshipSuggestionPendingImageToolTip %>"
             NavigateUrl="~/Friends.aspx" ></asp:HyperLink>
            <br />
            <asp:Label ID="SinceTitleLabel" runat="server" Text="<%$ Resources:Resource, SinceTitleLabelText %>"  SkinID="InfoLabel"></asp:Label>
            <asp:Label ID="SinceDataLabel" runat="server" Text="<%$ Resources:Resource, SinceDataLabelText %>"  SkinID="GridLabel"></asp:Label>
            <br />
            <asp:Label ID="ArenaLinkLabel" runat="server" Text='<%$ Resources:Resource, Global_Stadium %>' SkinID="InfoLabel"
                Visible="false"></asp:Label>
            <asp:HyperLink ID="ArenaLinkButton" runat="server" SkinID="GreenTitleHyperLink" Visible="false"></asp:HyperLink>
            <asp:Label ID="NoStadiumLabel" runat="server" Text="<%$ Resources:Resource, NoStadiumLabelText %>"  SkinID="GridLabel" Visible="false"></asp:Label>
            <br />
            <asp:Label ID="CoachTitleLabel" runat="server" Text='<%$ Resources:Resource, Global_Coach %>'  SkinID="InfoLabel"></asp:Label>
            <asp:HyperLink ID="CoachLinkButton" runat="server" SkinID="GreenTitleHyperLink"></asp:HyperLink>
            <asp:Label ID="NocoachLabel" runat="server" Text="<%$ Resources:Resource, NocoachLabelText %>"  SkinID="GridLabel"></asp:Label>
            <asp:Panel ID="FansPanel" runat="server">     
                <asp:Label ID="FansClubTitleLabel" runat="server" Text="<%$ Resources:Resource, FansClubTitleLabelText %>" SkinID="InfoLabel"></asp:Label>
                <asp:Label ID="FansClubLabel" runat="server" SkinID="GridLabel"></asp:Label>
                <br />
                <asp:Label ID="FansMoodTitleLabel" runat="server" Text="<%$ Resources:Resource, FansMoodTitleLabelText %>" SkinID="InfoLabel"></asp:Label>
                <asp:Label ID="FansMoodLabel" runat="server" SkinID="GridLabel"></asp:Label>
            </asp:Panel>
            <asp:Label ID="CurrentRankTitleLabel" runat="server" Text="<%$ Resources:Resource, CurrentNationalRank %>" SkinID="InfoLabel"></asp:Label>
            <asp:Label ID="CurrentRankLabel" runat="server"  SkinID="GridLabel"></asp:Label>
            <asp:Panel ID="NationalCupPanel" runat="server">
                <asp:Label ID="NationalCupRankTitleLabel" runat="server" Text="<%$ Resources:Resource, CurrentCupRank %>" SkinID="InfoLabel"></asp:Label>
                <asp:Label ID="NationalCupRankLabel" runat="server" SkinID="GridLabel"></asp:Label>
            </asp:Panel>
            <br /><br />   
            
            <asp:UpdatePanel ID="StatusUpdatePanel" runat="server" UpdateMode="Conditional">
            <ContentTemplate>
                <div id="statusDiv">
                    <i><asp:Label ID="StatusLabel" runat="server" SkinID="GridLabel" ></asp:Label></i>
                    <br />
                    <asp:Button ID="EditStatusButton" runat="server" Text="<%$ Resources:Resource, TeamHomePage_EditStatusButtonText %>"
                     CssClass="GreenSmallButtonStyle" OnClientClick="EditStatusOpen(); return false;" />
                </div>
                <div id="editStatus" style="display:none; border:2px solid #F4F3F3;">

                    <CustomControls:TextArea ID="StatusTextBox" runat="server" Width="200" Height="60" TextMode="MultiLine" MaxLength="255" CssClass="invisibleTextbox" 
                     onfocus="doFocus(this);" rows="3" ></CustomControls:TextArea>
                 
                    <br />
                    <div style="background-color:#F4F3F3; width:100%; text-align:center; padding:2px 0px 2px 0px; -moz-border-radius:15px; border-radius: 15px;">
                
                        <asp:Button ID="SubmitStatusButton" runat="server" Text="<%$ Resources:Resource, Global_Submit %>" CssClass="GreenSmallButtonStyle"
                            OnClientClick="FadeInStatusBox(); return true;" OnClick="SubmitNewStatus" />
                        <asp:Button ID="CancelStatusButton" runat="server" Text="<%$ Resources:Resource, Global_Cancel %>" CssClass="GreySmallButtonStyle"
                            OnClientClick="EditStatusCancel(); return false;" />
                
                     </div>
                </div>
            </ContentTemplate>
            </asp:UpdatePanel>
        </div>
        <div id="prizes_shelf">
                <asp:Label ID="PrizeShelfTitleLabel" runat="server" Text="<%$ Resources:Resource, TrophyLabelText %>" CssClass="black_bold_text floater" ></asp:Label>
                <br />
                <div id="scroll_prizes">
                    <asp:Panel ID="PrizesDirPanel" Direction="LeftToRight" runat="server">
                    <asp:Repeater ID="PrizesShelfRepeater" runat="server" DataSourceID="TropheySqlDataSource">
                    <HeaderTemplate>
                        <ul id="carouselul" class="jcarousel-skin-tango">
                    </HeaderTemplate>
                    <ItemTemplate>
                        
                        <li>
                            <asp:Image ID="CupImage" runat="server" ImageUrl='<%# Eval("Image", "~/Images/Prizes/{0}") %>' ToolTip='<%# Eval("Note") %>' />
                        </li>
                        <%--</div>--%>
                    </ItemTemplate>
                    <FooterTemplate>
                        </ul>
                    </FooterTemplate>
                    
                    </asp:Repeater> 
                    </asp:Panel>
                    <div class="clearBoth"></div>
                </div>               
            </div>
        <div id="team_links_div" class="floater">
            <div id="teamlinkscontainer">
            <div class="floater padding5 teamlinkswidth">
                <div class="team_links_background">
                <asp:Hyperlink ID="TeamPlayersImageLink" runat="server" ImageUrl="~/Images/Icons/TeamHomePageIcons/players.gif"
                ToolTip="<%$ Resources:Resource, Global_Players %>"></asp:Hyperlink>
                </div>
                
                <asp:HyperLink ID="TeamPlayersTextLink" runat="server" SkinID="GreenTitleHyperLink" Text="<%$ Resources:Resource, Global_Players %>" ></asp:HyperLink>
            </div>
            <div class="floater padding5 teamlinkswidth">
                <div class="team_links_background">
                <asp:Hyperlink ID="ListOfTeamTransfersImageLink" runat="server" ImageUrl="~/Images/Icons/TeamHomePageIcons/transfers.gif"
                ToolTip="<%$ Resources:Resource, ListOfTeamTransfersLinkButtonText %>"></asp:Hyperlink>
                </div>
                
                <asp:HyperLink ID="ListOfTeamTransfersTextLink" runat="server" SkinID="GreenTitleHyperLink" Text="<%$ Resources:Resource, ListOfTeamTransfersLinkButtonText %>"></asp:HyperLink>
            </div>
            <div class="floater padding5 teamlinkswidth">
                <div class="team_links_background">
                <asp:Hyperlink ID="TeamLatestEventsImageLink" runat="server" ImageUrl="~/Images/Icons/TeamHomePageIcons/events.gif"
                 ToolTip="<%$ Resources:Resource, Global_LatestEvents %>"></asp:Hyperlink>
                </div>
                
                <asp:HyperLink ID="TeamLatestEventsTextLink" runat="server" SkinID="GreenTitleHyperLink" Text="<%$ Resources:Resource, Global_LatestEvents %>"></asp:HyperLink>
            </div>
            <div class="floater padding5 teamlinkswidth">
                <div class="team_links_background">
                <asp:Hyperlink ID="TeamMatchesImageLink" runat="server"  ImageUrl="~/Images/Icons/TeamHomePageIcons/matches.gif"
                ToolTip="<%$ Resources:Resource, Global_Matches %>"></asp:Hyperlink>
                </div>
                
                <asp:HyperLink ID="TeamMatchesTextLink" runat="server" SkinID="GreenTitleHyperLink" Text="<%$ Resources:Resource, Global_Matches %>" ></asp:HyperLink>
            </div>
            <div class="floater padding5 teamlinkswidth">
                <div class="team_links_background">
                <asp:HyperLink ID="AnalisysImageLink" runat="server" Visible="false" ImageUrl="~/Images/Icons/TeamHomePageIcons/Analyze.gif"
                 ToolTip="<%$ Resources:Resource, OpponentAnalyze_LinkText %>"></asp:HyperLink>
                </div>
                
                <asp:HyperLink ID="AnalisysTextLink" runat="server" SkinID="GreenTitleHyperLink" Visible="false"  Text="<%$ Resources:Resource, OpponentAnalyze_LinkText %>"></asp:HyperLink>
            </div>
            </div>
            <div class="clearBoth"></div>
            <asp:Panel ID="FriendlyChallangePanel" runat="server">
                <br /><br /><br /><br />
                <asp:HyperLink ID="FriendlyChallangeHyperlink" runat="server" SkinID="BlackHyperLinkSkin" 
                Text="<%$ Resources:Resource, TeamHomePage_FriendlyChallangeTitleLabelText %>"></asp:HyperLink>
            </asp:Panel>   
            
            
            
            
        </div>
        
        <div class="clearBoth"></div>
    </div>
    </div>
    <div class="basic_element">
    <div class="red_title_no_padding">
    <div class="grey_title_inside_red floater">
        <asp:Label ID="GamesTitleLabel" runat="server" Text="<%$ Resources:Resource, Global_Games %>" CssClass="team_name_white"></asp:Label>
    </div>
    <div class="grey_title_triangle floater"></div>
    </div>
    <div class="clearBoth"></div>
    <div class="floater basic_element_in">
    <div class="padding5" id="thp_last_match">
        <asp:FormView ID="LastMatchFormView" runat="server" DataSourceID="PrevMatchDataSource" OnItemCommand="AddMatchToLive">
        <ItemTemplate>
            <div class="align_center" >
                
                <asp:HyperLink ID="PrevMatchLink" runat="server" Text="<%$ Resources:Resource, PrevMatchLinkText %>" CssClass="red_bold_title"
                    NavigateUrl='<%# Eval("MatchId", "MatchPage.aspx?MatchId={0}") %>' Visible='<%# Eval("Previous") %>'></asp:HyperLink>
                <asp:HyperLink ID="OngoingMatchLinkButton" runat="server" Text="<%$ Resources:Resource, OngoingMatchLinkButtonText %>"
                    NavigateUrl='<%# Eval("MatchId", "MatchPage.aspx?MatchId={0}") %>' Visible='<%# Eval("Ongoing") %>' CssClass="red_bold_title"></asp:HyperLink>
                <asp:ImageButton ID="AddToLiveButton" runat="server" ImageUrl="~/Images/Icons/LiveDetails.png" CommandName="AddToLive"
                    CommandArgument='<%# Eval("MatchId") %>' Visible='<%# Eval("CanAddToLive") %>' />
                <hr />
                <asp:Image ID="MatchTypeImage" runat="server" ImageUrl='<%# GetNivdalData.GetNivdalData.GetIconByMatchType(Eval("Type")) %>' 
                        ToolTip='<%#GetNivdalData.GetNivdalData.GetToolTipByMatchType(Eval("Type")) %>'/>
                <asp:Label ID="PrevMatchDateLabel" runat="server" Text='<%# Eval("Date") %>'        
                    SkinID="SmallHeaderLabel"></asp:Label> 
                <div class="clearBoth"></div>
                <div class="floater width50 padding5"   >
                    <asp:Hyperlink ID="PrevMatchHomeTeamNameLink" runat="server" Text='<%# Eval("HomeTeamName") %>'
                        NavigateUrl='<%# Eval("HomeTeamId", "TeamHomePage.aspx?TeamId={0}") %>' CssClass="TeamLinkInMatchStyle"></asp:Hyperlink>
                </div>     
                <div class="floater width50 padding5">
                    <asp:Image ID="VsImage1" runat="server" ToolTip="<%$ Resources:Resource, VS1LabelText %>" ImageUrl="~/Images/Icons/TeamHomePageIcons/vs.png" />
                </div>
                <div class="floater width50 padding5">
                    <asp:Hyperlink ID="PrevMatchAwayTeamNameLink" runat="server" Text='<%# Eval("AwayTeamName") %>'
                        NavigateUrl='<%# Eval("AwayTeamId", "TeamHomePage.aspx?TeamId={0}") %>' CssClass="TeamLinkInMatchStyle"></asp:Hyperlink>
                </div>
                <div class="clearBoth"></div>
                <div class="floater width50 padding5">
                    <asp:Image ID="PrevMatchHomeTeamLogo" runat="server"  onerror="this.src='Images/menupicture.gif';"
                        ImageUrl='<%# Eval("HomeTeamLogo") %>' Width="32px" Height="32px"/> 
                </div>
                <div class="floater width50 padding5">
                        <asp:Label ID="PrevMatchResultLabel" runat="server" Text='<%# Eval("Result") %>' SkinID="InfoLabel"></asp:Label>
                </div>
                <div class="floater width50 padding5">
                        <asp:Image ID="PrevMatchAwayTeamLogo" runat="server"  onerror="this.src='Images/menupicture.gif';"
                        ImageUrl='<%# Eval("AwayTeamLogo") %>' Width="32px" Height="32px"/>        
                </div>
                <div class="clearBoth"></div>
            </div>
        </ItemTemplate>
        </asp:FormView>
    </div>
    </div>       
    <div class="floater basic_element_in">
    <div class="padding5 align_center" id="thp_league_table">
        
        <asp:HyperLink ID="LeagueLinkButton" runat="server" Text="<%$ Resources:Resource, Global_League %>" CssClass="red_bold_title"  ></asp:HyperLink>
        <hr />
        <asp:GridView ID="LeagueTableGridView" runat="server" SkinID="Professional" DataSourceID="LeagueTableDataSourse" AutoGenerateColumns="False"  >
            <Columns>   
                <asp:TemplateField ItemStyle-Width="5%">
                    <HeaderTemplate>
                        <asp:Label ID="PositionTitleLabel" runat="server" Text="#" ToolTip="<%$ Resources:Resource, Global_Position %>"></asp:Label>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:Label ID="PositionLabel" runat="server" Text='<%# Eval("N") %>' SkinID="GridLabel"></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField ItemStyle-Width="55%">
                    <HeaderTemplate>
                        <asp:Label ID="TeamNameTitleLabel" runat="server" Text="<%$ Resources:Resource, Global_TeamName %>" ToolTip="TeamName"></asp:Label>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:Hyperlink ID="TeamNameItemLabel" runat="server" Text='<%# Eval("TeamName") %>' Visible='<%# !(bool)Eval("IsTeam") %>'
                         NavigateUrl='<%# Eval("TeamId", "TeamHomePage.aspx?TeamId={0}") %>' SkinID="BlackHyperLinkSkin"></asp:Hyperlink>
                         <asp:Hyperlink ID="Hyperlink1" runat="server" Text='<%# Eval("TeamName") %>' Visible='<%# Eval("IsTeam") %>'
                         NavigateUrl='<%# Eval("TeamId", "TeamHomePage.aspx?TeamId={0}") %>' SkinID="GreenTitleHyperLink"></asp:Hyperlink>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField ItemStyle-Width="10%">
                    <HeaderTemplate>
                        <asp:Label ID="GamesPlayedTitleLabel" runat="server" Text="<%$ Resources:Resource, Global_GamesHeader %>"  ToolTip="<%$ Resources:Resource, GamesPlayedTitleLabelTip %>"></asp:Label>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:Label ID="GamesPlayedItemLabel" runat="server" Text='<%# Eval("GamesPlayed") %>' SkinID="GridLabel"></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField ItemStyle-Width="10%">
                    <HeaderTemplate>
                        <asp:Label ID="PointsHeaderLabel" runat="server" Text="<%$ Resources:Resource, PointsHeaderLabelText %>" ToolTip="<%$ Resources:Resource, PointsHeaderLabelTip %>"></asp:Label>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:Label ID="PointsItemLabel" runat="server" Text='<%# Eval("Points") %>' SkinID="GridLabel"></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField ItemStyle-Width="20%">
                    <HeaderTemplate>
                        <asp:Label ID="GoalsTitleLabel" runat="server" Text="<%$ Resources:Resource, Global_Goals %>" ToolTip="<%$ Resources:Resource, Global_Goals %>"></asp:Label>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:Label ID="GoalsItemLabel" runat="server" Text='<%# Eval("GoalsDifferrence") %>' SkinID="GridLabel"></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>                
            </Columns>
        </asp:GridView>
    </div>
    </div>
    <div class="floater basic_element_in">
    
    <div class="padding5" id="thp_next_match">
        <asp:FormView ID="NextMatchFormView" runat="server" DataSourceID="NextMatchDataSourse" OnItemCommand="AddMatchToLive">
        <ItemTemplate>
        <div class="align_center" >
        <asp:HyperLink ID="NextMatchLabel" runat="server" Text="<%$ Resources:Resource, NextMatchLabelText %>" CssClass="red_bold_title"
                NavigateUrl='<%# Eval("MatchId", "MatchPage.aspx?MatchId={0}") %>'></asp:HyperLink>
        <asp:ImageButton ID="AddToLiveButton" runat="server" ImageUrl="~/Images/Icons/LiveDetails.png" CommandName="AddToLive"
                CommandArgument='<%# Eval("MatchId") %>' Visible='<%# IsAllowedLive(Eval("CanAddToLive")) %>' 
                ToolTip="<%$ Resources:Resource, Live_AddMatchToLiveText %>" />
        <asp:HyperLink ID="NextMatchInstructionsLink" runat="server" NavigateUrl='<%# "~/MatchInstructions_New.aspx?MatchId=" + Eval("MatchId") %>'
            ImageUrl='<%# InstructionsImage(Eval("InstructionsNeeded")) %>' 
            ToolTip='<%# InstructionsToolTip(Eval("InstructionsNeeded")) %>'
            Visible='<%# InstructionsVisible(Eval("InstructionsNeeded")) %>'></asp:HyperLink>
       
        <hr />
        
        <asp:Image ID="MatchTypeImage" runat="server" ImageUrl='<%# GetNivdalData.GetNivdalData.GetIconByMatchType(Eval("Type")) %>' 
            ToolTip='<%#GetNivdalData.GetNivdalData.GetToolTipByMatchType(Eval("Type")) %>'/>
        <asp:Label ID="NextMatchDateLabel" runat="server" Text='<%# Eval("Date") %>'        
            SkinID="SmallHeaderLabel"></asp:Label>
        <div class="clearBoth"></div>
        <div class="floater width50 padding5">
            <asp:Hyperlink ID="NextMatchHomeTeamNameLink" runat="server" Text='<%# Eval("HomeTeamName") %>'
            NavigateUrl='<%# Eval("HomeTeamId", "TeamHomePage.aspx?TeamId={0}") %>' CssClass="TeamLinkInMatchStyle"></asp:Hyperlink>                    
        </div>
        <div class="floater width50 padding5">
            <asp:Image ID="VsImage2" runat="server" ToolTip="<%$ Resources:Resource, VS1LabelText %>" ImageUrl="~/Images/Icons/TeamHomePageIcons/vs.png" />
        </div>
        <div class="floater width50 padding5">
            <asp:Hyperlink ID="NextMatchAwayTeamNameLink" runat="server" Text='<%# Eval("AwayTeamName") %>'
             NavigateUrl='<%# Eval("AwayTeamId", "TeamHomePage.aspx?TeamId={0}") %>' CssClass="TeamLinkInMatchStyle"></asp:Hyperlink>
        </div>
        <div class="clearBoth"></div>
        <div class="floater width50 padding5">
        <asp:Image ID="NextMatchHomeTeamLogo" runat="server" onerror="this.src='Images/menupicture.gif';"
                ImageUrl='<%# Eval("HomeTeamLogo") %>' Width="32px" Height="32px"/> 
        </div>
        <div class="floater width50 padding5">&nbsp;</div>
        <div class="floater width50 padding5">
        <asp:Image ID="NextMatchAwayTeamLogo" runat="server" onerror="this.src='Images/menupicture.gif';"
                ImageUrl='<%# Eval("AwayTeamLogo") %>' Width="32px" Height="32px"/>   
        </div>
        <div class="clearBoth"></div>
        </div>
        </ItemTemplate>
        </asp:FormView>
    </div>
    </div>       
    <div class="clearBoth"></div>
    </div> 
    <asp:SqlDataSource ID="TropheySqlDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
        SelectCommand="Nivdal_GetTrophiesList" SelectCommandType="StoredProcedure"></asp:SqlDataSource>
    <asp:SqlDataSource ID="LeagueTableDataSourse" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
        SelectCommand="Nivdal_ShowPartOfLeagueTable" SelectCommandType="StoredProcedure"></asp:SqlDataSource>
    <asp:SqlDataSource ID="PrevMatchDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
        SelectCommand="Nivdal_GetLastMatchforTeam" SelectCommandType="StoredProcedure"></asp:SqlDataSource>
    <asp:SqlDataSource ID="NextMatchDataSourse" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
        SelectCommand="Nivdal_GetNextMatchforTeam" SelectCommandType="StoredProcedure"></asp:SqlDataSource>     
</asp:Content>
<asp:Content ID="PageNameContent" ContentPlaceHolderID="PageNamePlaceHolder" runat="server">
    <asp:Label ID="PageNameTeamNameLabel" runat="server" CssClass="PageNameContentStyle"></asp:Label>
    <asp:Label ID="PageNameLabel" runat="server" Text="<%$ Resources:Resource, PageNameLabelText %>" CssClass="PageNameContentStyle"></asp:Label>   
</asp:Content>


